﻿using GenericAndReflection.Model;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace GenericAndReflection.IDAL
{
    public interface IBaseDAL
    {

        #region 查询
        T FindOne<T>(int id) where T : BaseModel;

        IEnumerable<T> FindAll<T>() where T : BaseModel;
        #endregion

        #region 增删改
        T Add<T>(T t) where T : BaseModel;
        T Update<T>(T t) where T :BaseModel;
        T Delete<T>(int id) where T:BaseModel;

        #endregion


    }
}
